import { BaseApi } from "@/api/base";
import http from "@/api/http";

class RoleApi extends BaseApi {
  constructor(url) {
    super(url);
  }

  listAll = (params: any): Promise<any> => {
    return http.get(this.url + "/listAll", params);
  };

  deptList = (params: any): Promise<any> => {
    return http.get(this.url + "/dept/list", params);
  };

  deptSave = (params: any): Promise<any> => {
    return http.post(this.url + "/dept/save", params);
  };

  menuList = (params: any): Promise<any> => {
    return http.get(this.url + "/menu/list", params);
  };

  menuSave = (params: any): Promise<any> => {
    return http.post(this.url + "/menu/save", params);
  };
}
export default new RoleApi("/system/role");
